
<script>

	$().ready(function() {
		// validate the comment form when it is submitted
		
		
		// validate signup form on keyup and submit
		$("#insertStudente").validate({
			rules: {
				matricola: {
					required: true,
					number: true
					},
					date: {
						required: true,
						date: true
						},
						email: {
							required: true,
							email: true
							},

					nome: "required",
					cognome:"required"
								
						
		       		
			},
			messages: {
				matricola: {
					required: "inserisci la matricola",
					number: "il formato non e' corretto"
				},
				date: {
					required: "inserisci la data",
					date: "il formato non e' corretto"
				},
				email: {
					required: "inserisci l'email",
					email: "il formato non e' corretto"
				},
				nome: {
					required: "inserisci il nome"
						},
				cognome: {
						required: "inserisci il cognome"
						}
								
				
			}
		});
	});	
	$(function()
			{
				$('.date-pick').datePicker({startDate:'01/01/1996'});
			});
	
</script>

<div id="page">

<div id="content">
<form method="get" id="updateLaureato"
	action="<?php echo BASE_PATH;?>Laureato/Update_Laureato/?>">
<fieldset><legend>Modifica i dati:</legend>

<ol>

	<input type="hidden" name="matricola" value="<?echo $_GET[matricola];?>">

		
	<li><label for="nome">Nome :</label>
		<input type="text" name="nome" size="30" value="<?php echo $vars[Laureato][0][Nome];?>">
		</li>		
	
	<li><label for="nome">Cognome :</label>
		<input type="text" name="cognome" size="30" value="<?php echo $vars[Laureato][0][Cognome];?>">
		</li>
	
	<li><label for="nome">Email :</label>
		<input type="text" name="email" size="30" value="<?php echo $vars[Laureato][0][Email];?>">
		</li>
	
	<li><label for="nome">Data  di nascita:</label>
		<input type="text" title="date" name="date" id="sel" size="10" class="date-pick" value="<?php echo $vars[Laureato][0]['Data di nascita'];?>">
	</li>
	
	<li><label for="nome">Relatore :</label>
		<input type="text" name="relatore" size="20"value="<?php echo $vars[Laureato][0][Relatore];?>">
	</li>
	
	<li><label for="nome">Anno Immatricolazione :</label>
			<select name="annoimm">
    <?php foreach ($vars['AnnoAccademico'] as $result){?>
    <option value="<?php echo $result['IdAnno'] ;?>"
    <?php if($result['datainizio'].'/'.$result['datafine']==$vars[Laureato][0]['Anno immatricolazione']) echo 'selected=selected'; ?>>
    <?php echo $result['datainizio'].'/'.$result['datafine'];?></option>
  <?php }?>
  </select>
	</li>
		
	<li><label for="nome">Tesi :</label>
		<input type="text" name="tesi" size="20"value="<?php echo $vars[Laureato][0][Tesi];?>">
	</li>
	
		<input type="submit" value="Modifica i dati">

		
</form>

</div>
</div>
<?php
if ($vars==1) {?>
<div class="insert"><?echo 'Inserimento avvenuto con successo';}?></div>

